// import { fromJS } from 'immutable';
import * as constants from './constants';

const defaultState = {
    loading: false,
    logInfo: {
        BucketName: '',
        BucketId: '',
        NextMarker: '',
        DataSet: []
    }
};

export default (state = defaultState, action) => {
    switch (action.type) {
        case constants.LOG_LIST:
            return {...state, 'logInfo': action.logInfo};
        case constants.REQ_LOADING:
            return {...state, 'loading': action.loading};
        default:
            return state;
    }
}